##---------------------------------------------------
## 2021 Koenigsegg Gemera
## Replacement for Porsche Carrera GT
## Cishy - NFSMW Mod Car
## Attributes.bin patch script
##---------------------------------------------------

memfile GLOBAL\GlobalMemoryFile.bin
vpak GLOBAL\ATTRIBUTES.BIN db

##---------------------------------------------------
## Node: pvehicle/default/cars/racers/carreragt
##---------------------------------------------------

## TurboSND[0]
patch	int32	bin:0x311dc	0xaa6ba0b0

## TurboSND[1]
patch	int32	bin:0x311ec	0x3f333115

## VerbalType; copspeech related; code determines what cops will call your car
## PATCH LENGTH ADDRESS, NOT DATA
patch	int32	bin:0x31190	0x00000200

## MASS; self-explanatory; mass of car expressed in kilograms
patch	float	bin:0x31188	1450

## engineaudio[0]
patch	int32	bin:0x312b8	0xa4b0acE5

## TENSOR_SCALE; seems to be overall handling speed scale balancing
## the bigger 2nd value is the slower the car will respond to steering input
## countered by increasing of 1st and 3rd value
patch	float	bin:0x31150	1
patch	float	bin:0x31154	2
patch	float	bin:0x31158	1
patch	float	bin:0x3115c	0

## HandlingRating; used to set min and max handling bars length; doesn't take effect from base or end grip values but its increase is dependent
## on chassis and tires values
## values range from 37-98 for 1st set and 90-100 for 2nd set
patch	float	bin:0x311c8	50
patch	float	bin:0x311cc	98

##---------------------------------------------------
## Node: ecar/default/racers/carreragt
##---------------------------------------------------

## BodyDive; maximum vector-based movement of front of car body
## 1st - Degrees/G
## 2nd - Max G
## 3rd - Degrees/sec
patch	float	bin:0x3cc28	8
patch	float	bin:0x3cc2c	1
patch	float	bin:0x3cc30	6

## RideHeight; in-race only; visible body height
patch	float	bin:0x3cc6c	-4

## TireOffsets
## in format x, y, z, w
## x axis; car front = +; car rear = -
## y axis; left side = +; right = -
## z axis; up = +; down = - note: will move WHEELS [up or down] regarding CAR BODY, during race body will be on normal level
## unlike wheels that might be BELOW ground
## w - wheel diameter scaling; default game values range between 0.31 [elise] and 0.35 [mustanggt]
## NOTE: CAR BODY height will be changed to match wheel size
## all axles have point 0 in center of line between front left and rear right wheel or between front right and rear left

## front left
patch	float	bin:0x3cb80	1.39
patch	float	bin:0x3cb84	0.93
patch	float	bin:0x3cb88	0
patch	float	bin:0x3cb8c	0.3

## front right
patch	float	bin:0x3cb90	1.39
patch	float	bin:0x3cb94	-0.93
patch	float	bin:0x3cb98	0
patch	float	bin:0x3cb9c	0.3

## rear right
patch	float	bin:0x3cba0	-1.42
patch	float	bin:0x3cba4	-0.92
patch	float	bin:0x3cba8	0.0
patch	float	bin:0x3cbac	0.33

## rear left
patch	float	bin:0x3cbb0	-1.42
patch	float	bin:0x3cbb4	0.92
patch	float	bin:0x3cbb8	0.0
patch	float	bin:0x3cbbc	0.33

## BodySquat; maximum vector-based movement of rear of car body
## 1st - Degrees/G
## 2nd - Max G
## 3rd - Degrees/sec
patch	float	bin:0x3cc1c	8
patch	float	bin:0x3cc20	1
patch	float	bin:0x3cc24	6

## CamberRear; angle between the vertical axis of the wheel and the vertical axis of the vehicle
## positive values for bottom of wheel being further out than top, negative for opposite effect
## common value is 0.18
patch	float	bin:0x3cc68	0.18

## CamberFront; angle between the vertical axis of the wheel and the vertical axis of the vehicle
## positive values for bottom of wheel being further out than top, negative for opposite effect
## common value is 0.22
patch	float	bin:0x3cc60	0.22

## FECompressions; used to adjust height of car body regarding wheels in frontend menus
## common value range is 2x0.10-2x0.20
patch	float	bin:0x3cc98	0.25
patch	float	bin:0x3cc9c	0.25

## TireSkidWidth; aka tire width
## common value range is 2x0.225 for front wheels and 2x0.335 for rear wheels
patch	float	bin:0x3cc4c	0.255
patch	float	bin:0x3cc50	0.255
patch	float	bin:0x3cc54	0.295
patch	float	bin:0x3cc58	0.295

## WheelSpokeCount; number of spokes in rims
## common value range N/A since it differs per car
patch	int8	bin:0x3cc8c	7

## ReflectionOffset
patch	float	bin:0x3cc64	0

## KitWheelOffsetRear; used to move wheels along axis Y when bodykits are used
## values range from 0 to 128; applies to REAR axle
patch	int8	bin:0x3cc78	0
patch	int8	bin:0x3cc79	0
patch	int8	bin:0x3cc7a	0
patch	int8	bin:0x3cc7b	0
patch	int8	bin:0x3cc7c	0
patch	int8	bin:0x3cc7d	0

## BodyRoll; maximum vector-based movement of entire car body towards left or right
## simply put - car body leaning sideways
## 1st - Degrees/G
## 2nd - Max G
## 3rd - Degrees/sec
patch	float	bin:0x3cc10	3.5
patch	float	bin:0x3cc14	1
patch	float	bin:0x3cc18	8

## KitWheelOffsetFront; used to move wheels along axis Y when bodykits are used
## values range from 0 to 128; applies to FRONT axle
patch	int8	bin:0x3cc86	0
patch	int8	bin:0x3cc87	0
patch	int8	bin:0x3cc88	0
patch	int8	bin:0x3cc89	0
patch	int8	bin:0x3cc8a	0
patch	int8	bin:0x3cc8b	0

##---------------------------------------------------
## Node: tires/default/carreragt
##---------------------------------------------------

## SECTION_WIDTH; self-explanatory; measured in milimetres
## common value range N/A since it differs per car
patch	float	bin:0x22000	235
patch	float	bin:0x22004	235

## YAW_CONTROL; equivalent of section-based traction and stability control system; values 1 and 2 for front; values 3 and 4 for rear
## effect similar to dynamic mass bias shifting; highly dependent on WEIGHT_BIAS, AERO_CG, TORQUE_SPLIT and DYNAMIC/STATIC_GRIP values
## common value range N/A since it differs per car; mass and acceleration dependent
patch	float	bin:0x21fc8	0.1
patch	float	bin:0x21fcc	0.25
patch	float	bin:0x21fd0	0.4
patch	float	bin:0x21fd4	0.5

## DYNAMIC_GRIP; amount of friction the tires produce when traction is broken, ie when the car is sliding or in a burnout
## common value range N/A since it differs per car; mass and acceleration dependent
patch	float	bin:0x21fe0	1.802
patch	float	bin:0x21fe4	1.805

## RIM_SIZE; self-explanatory; measured in inches
## common value range is 2x16-2x19
patch	float	bin:0x21ff0	18
patch	float	bin:0x21ff4	18

## YAW_SPEED; self-explanatory; rate at which car enters yaw state
## common value range is 0.30-0.70
patch	float	bin:0x2200c	0.4

## ASPECT_RATIO; self-explanatory; ratio of section height to section width
## common value range is 2x30-2x55
patch	float	bin:0x21fe8	45
patch	float	bin:0x21fec	45

## STATIC_GRIP; static grip is the amount of friction the tires are able to produce when they are not spinning, though they can be rolling
## common value range N/A since it differs per car; mass and acceleration dependent
patch	float	bin:0x21ff8	2
patch	float	bin:0x21ffc	2

## GRIP_SCALE; tire grip scaling per axle
## common value range is 2x1.00-2x1.10
patch	float	bin:0x21fd8	1.108
patch	float	bin:0x21fdc	1.111

## STEERING; steering ratio; value of 1.00 means that turning steering wheel by 360 degrees will turn wheels by 36 degrees
## common value range is 0.90-1.10
patch	float	bin:0x22008	1.122

##---------------------------------------------------
## Node: tires/default/carreragt/carreragt_top
##---------------------------------------------------

## SECTION_WIDTH
patch	float	bin:0x23900	235
patch	float	bin:0x23904	235

## YAW_CONTROL
patch	float	bin:0x238c8	0.1
patch	float	bin:0x238cc	0.35
patch	float	bin:0x238d0	0.7
patch	float	bin:0x238d4	1

## DYNAMIC_GRIP
patch	float	bin:0x238e0	2.4
patch	float	bin:0x238e4	2.4

## RIM_SIZE
patch	float	bin:0x238f0	18
patch	float	bin:0x238f4	18

## YAW_SPEED
patch	float	bin:0x2390c	0.4

## ASPECT_RATIO
patch	float	bin:0x238e8	45
patch	float	bin:0x238ec	45

## STATIC_GRIP
patch	float	bin:0x238f8	2.6
patch	float	bin:0x238fc	2.6

## GRIP_SCALE
patch	float	bin:0x238d8	1.6
patch	float	bin:0x238dc	1.6

## STEERING
patch	float	bin:0x23908	1.295

##---------------------------------------------------
## Node: brakes/default/carreragt
##---------------------------------------------------

## BRAKES; overall braking power per axle
## common value range is 300/400-650/700; mass dependent
patch	float	bin:0x2436c	300
patch	float	bin:0x24370	550

## EBRAKE; handbrake power; should be larger than BRAKES value by at least 10% and larger than overall car horsepower
## common value range is 400-800; mass dependent
patch	float	bin:0x24374	400

## BRAKE_LOCK; BRAKES field values multiplier and braking force distribution ratio
## common value range is 1.00 for front axle and 3.20-3.60 for rear axle
patch	float	bin:0x24364	1
patch	float	bin:0x24368	3

##---------------------------------------------------
## Node: brakes/default/carreragt/carreragt_top
##---------------------------------------------------

## BRAKES
patch	float	bin:0x2481c	400
patch	float	bin:0x24820	550

## EBRAKE
patch	float	bin:0x24824	700

## BRAKE_LOCK
patch	float	bin:0x24814	1
patch	float	bin:0x24818	3

##---------------------------------------------------
## Node: chassis/default/carreragt
##---------------------------------------------------

## WHEEL_BASE; distance between the centers of the front and rear wheels
## common value range N/A since it differs per car
patch	float	bin:0x83c8	2.575

## DRAG_COEFFICIENT; air resistance of object travelling in a non-vacuum environment such as air
## common value range is 0.25-0.42
patch	float	bin:0x83e4	0.27

## SHOCK_VALVING; shock absorber oil flow restriction
## common value range is 2x15-2x24
patch	float	bin:0x83b4	19
patch	float	bin:0x83b8	19

## RIDE_HEIGHT; aka ground clearance
## common value range is 2x6-2x9
patch	float	bin:0x838c	9
patch	float	bin:0x8390	9

## SHOCK_STIFFNESS; minimum pressure inside shock absorber in pounds per square inch
## common value range is 2x30-2x80; acceleration and mass-dependent
patch	float	bin:0x83a4	40
patch	float	bin:0x83a8	40

## SHOCK_BLOWOUT; maximum size by which a dampener can compress in inches; stock same as upgraded
## common value range is 5-8
patch	float	bin:0x83cc	6

## SHOCK_EXT_STIFFNESS; maximum shock absorber rebound force
## common value range is 2x40-2x80; acceleration-, downforce- and mass-dependent
patch	float	bin:0x839c	52
patch	float	bin:0x83a0	52

## SWAYBAR_STIFFNESS; self-explanatory; probably expressed in pounds per square inch
## common value range is 2x200-2x450; acceleration and mass dependent
patch	float	bin:0x83bc	200
patch	float	bin:0x83c0	150

## ROLL_CENTER; vertical center of gravity [probably in inches]
## common value range is 8-10
patch	float	bin:0x83c4	10

## TRAVEL; maximum length by which a shock can be extended if car wheels don't have contact with road surface; stock commonly higher than upgraded
## common value range is 2x6-2x8; acceleration and mass dependent
patch	float	bin:0x8384	7
patch	float	bin:0x8388	7

## SPRING_STIFFNESS; overall coilover pressure in pounds square inch
## common value range is 2x400-2x700
patch	float	bin:0x83ac	375
patch	float	bin:0x83b0	375

## AERO_CG; overall distribution of aerodynamic force on the car body; values between 0 and 100; 0 for max in rear, 100 for max in front
## common value range is 47-51
patch	float	bin:0x83d0	48

## SPRING_PROGRESSION; maximum compression speed/rate for spring to achieve maximum stiffness; stock smaller than upgraded
## higher values will make springs stiffer faster so car won't shove ground on slopes but will also increase bouncing on curbs
## common value range is 2x5-2x8
patch	float	bin:0x837c	5
patch	float	bin:0x8380	5

## TRACK_WIDTH; axle length; distance between wheels on a single axle; measured in metres
## common value range N/A since it differs per car
patch	float	bin:0x8394	1.57
patch	float	bin:0x8398	1.57

## SHOCK_DIGRESSION; digressive shocks provide smoother ride at higher speeds and absorb body roll also improving cornering; smaller value for smoother ride
## common value range is 2x0.1-2x0.5
patch	float	bin:0x8374	0.2
patch	float	bin:0x8378	0.2

## RENDER_MOTION; dependent on ecar node settings in body roll, dive and squat; used as a multiplier of the mentioned values to calculate car body movement
## common value range is 0.50-1.00
patch	float	bin:0x83d4	1

## AERO_COEFFICIENT; used to define car aerodynamics factor and overall downforce; value too small will make it slow and too high will push it down to
## ground too hard making it difficult to drive and car will be constantly hitting road due to excessive amount of downforce
## common value range is 0.15-0.30
patch	float	bin:0x83dc	0.17

## FRONT_AXLE; front axle diameter in inches
## common value range is 1.2-1.5
patch	float	bin:0x83d8	1.25

## FRONT_WEIGHT_BIAS; overall mass distribution; values from 0 to 100; 0 for max rear bias; 100 for max front bias
## common value range is 51-55
patch	float	bin:0x83e0	53.5

##---------------------------------------------------
## Node: chassis/default/carreragt/carreragt_top
##---------------------------------------------------

## WHEEL_BASE
patch	float	bin:0x9cb4	2.575

## DRAG_COEFFICIENT
patch	float	bin:0x9cd0	0.4

## SHOCK_VALVING
patch	float	bin:0x9ca0	24
patch	float	bin:0x9ca4	24

## RIDE_HEIGHT
patch	float	bin:0x9c78	8
patch	float	bin:0x9c7c	8

## SHOCK_STIFFNESS
patch	float	bin:0x9c90	55
patch	float	bin:0x9c94	55

## SHOCK_BLOWOUT
patch	float	bin:0x9cb8	6

## SHOCK_EXT_STIFFNESS
patch	float	bin:0x9c88	65
patch	float	bin:0x9c8c	65

## SWAYBAR_STIFFNESS
patch	float	bin:0x9ca8	398
patch	float	bin:0x9cac	350

## ROLL_CENTER
patch	float	bin:0x9cb0	9.3

## TRAVEL
patch	float	bin:0x9c70	6.5
patch	float	bin:0x9c74	6.5

## SPRING_STIFFNESS
patch	float	bin:0x9c98	600
patch	float	bin:0x9c9c	550

## AERO_CG
patch	float	bin:0x9cbc	49

## SPRING_PROGRESSION
patch	float	bin:0x9c68	8.1
patch	float	bin:0x9c6c	7.5

## TRACK_WIDTH
patch	float	bin:0x9c80	1.57
patch	float	bin:0x9c84	1.57

## SHOCK_DIGRESSION
patch	float	bin:0x9c60	0.15
patch	float	bin:0x9c64	0.15

## RENDER_MOTION
patch	float	bin:0x9cc0	0.5

## AERO_COEFFICIENT
patch	float	bin:0x9cc8	0.25

## FRONT_AXLE
patch	float	bin:0x9cc4	1.25

## FRONT_WEIGHT_BIAS
patch	float	bin:0x9ccc	54

##---------------------------------------------------
## Node: engine/default/carreragt
##---------------------------------------------------

## ENGINE_BRAKING; multiplies maximum torque at current gear and uses it to calculate speed loss with no throttle used
## common value range is 0.70-0.90
patch	float	bin:0x12b94	0.5
patch	float	bin:0x12b98	0.6
patch	float	bin:0x12b9c	0.7

## IDLE; minimum operating speed of engine necessary to sustain its work but not enough to move drivetrain components
## common value range is 800-950
patch	float	bin:0x12bac	800

## TORQUE; self-explanatory; field count suggest game used to support up to 15 torque values; can only use 9 now
## common value range N/A since it differs per car
patch	float	bin:0x12b58	240
patch	float	bin:0x12b5c	310
patch	float	bin:0x12b60	425
patch	float	bin:0x12b64	565
patch	float	bin:0x12b68	646
patch	float	bin:0x12b6c	695
patch	float	bin:0x12b70	581
patch	float	bin:0x12b74	539
patch	float	bin:0x12b78	420

## MAX_RPM; maximum operating speed of engine before its destruction [drag racing only]
## common value range N/A since it differs per car
patch	float	bin:0x12ba4	10000

## FLYWHEEL_MASS; the higher the mass, the higher the maximum inertia moment and therefore larger amounts of kinetic energy can be stored
## also the lower the mass, the faster the top speed can be achieved and maintained
## common value range is 9-15
patch	float	bin:0x12ba0	5

## RED_LINE; maximum safe operating speed of engine
## common value range N/A since it differs per car
patch	float	bin:0x12ba8	9000

##---------------------------------------------------
## Node: engine/default/carreragt/carreragt_top
##---------------------------------------------------

## ENGINE_BRAKING
patch	float	bin:0x13cd4	0.5
patch	float	bin:0x13cd8	0.6
patch	float	bin:0x13cdc	0.7

## IDLE
patch	float	bin:0x13cec	900

## TORQUE
patch	float	bin:0x13c98	380
patch	float	bin:0x13c9c	580
patch	float	bin:0x13ca0	645
patch	float	bin:0x13ca4	765
patch	float	bin:0x13ca8	990
patch	float	bin:0x13cac	1080
patch	float	bin:0x13cb0	935
patch	float	bin:0x13cb4	807
patch	float	bin:0x13cb8	685

## MAX_RPM
patch	float	bin:0x13ce4	10000

## FLYWHEEL_MASS
patch	float	bin:0x13ce0	5

## RED_LINE
patch	float	bin:0x13ce8	9000

##---------------------------------------------------
## Node: induction/default/carreragt_top
##---------------------------------------------------

## AIR_PRESSURE*; commonly 0.25
patch	float	bin:0x11ce8	0.25

## HIGH_BOOST
patch	float	bin:0x11cfc	0.1

## LOW_BOOST
patch	float	bin:0x11ce4	0.1

## PSI_ARROW_MOVE_SPEED*; always higher value for stock
patch	float	bin:0x11cf4	2.5

## PSI; maximum pressure of air taken into the turbine
## common value range is 12-15
patch	float	bin:0x11cf8	13

## SPOOL; turbine lag; 0 for 'supercharger'; anything higher will give 'turbo' upgrade
## common value range is 0.00-0.20
patch	float	bin:0x11cf0	0.22

## BOOST_VARIANCE*; pressure drop/rise in chamber
patch	float	bin:0x11cec	-0.15

##---------------------------------------------------
## Node: transmission/default/carreragt
##---------------------------------------------------

## GEAR_COUNT; 1st GEAR_RATIO offset -6; total amount of gears including reverse, neutral and forward gears
## maximum number of elements is 11 but only 10 are proven to cause no problems with car drivability
## common value range is 7-9
patch	int16	bin:0x1e5a2	8

## GEAR_RATIO; drivetrain power transfer ratios
## common value range N/A since it differs per car
patch	float	bin:0x1e5a8	2.81
patch	float	bin:0x1e5ac	0
patch	float	bin:0x1e5b0	2.77
patch	float	bin:0x1e5b4	1.71
patch	float	bin:0x1e5b8	1.23
patch	float	bin:0x1e5bc	0.96
patch	float	bin:0x1e5c0	0.77
patch	float	bin:0x1e5c4	0.79
patch	float	bin:0x1e5c8	0

## DIFFERENTIAL; self-explanatory; differential bias; 0.00 for rear, 0.50 for mid and 1.00 for front
## setting towards front will lock the front wheels more, causing the car to be prone to oversteer; inverse effect if bias set towards rear
## common value range is 2x0.60-2x0.80; 3x0.60-3x0.80 if car is AWD
patch	float	bin:0x1e5d4	0.7
patch	float	bin:0x1e5d8	0.7
patch	float	bin:0x1e5dc	0

## GEAR_EFFICIENCY; overall power multiplier on current gear and rpm used to quickly change speed at each gear without any major reconfigurations
## common value set is 9x1.00
patch	float	bin:0x1e5e8	1
patch	float	bin:0x1e5ec	1
patch	float	bin:0x1e5f0	1
patch	float	bin:0x1e5f4	1
patch	float	bin:0x1e5f8	1
patch	float	bin:0x1e5fc	1
patch	float	bin:0x1e600	1
patch	float	bin:0x1e604	1
patch	float	bin:0x1e608	1

## TORQUE_CONVERTER; percentage ratio of torque converter efficiency with automatic transmission usage
## common value range is 0.20-0.80
patch	float	bin:0x1e60c	0.5

## TORQUE_SPLIT; torque-to-axle transfer ratio; 0 for RWD, 0.5 for AWD and 1 for FWD
## common value range N/A since it differs per car
patch	float	bin:0x1e610	0

## CLUTCH_SLIP; self-explanatory; manual gearbox efficiency ratio
## common value range is 0.70-0.90
patch	float	bin:0x1e614	0.8

## SHIFT_SPEED; shifting interval; stock [should be] higher than upgraded
## common value range is 0.10-0.25
patch	float	bin:0x1e61c	0.25

## FINAL_GEAR; final gear ratio determining top speed
## common value range N/A since it differs per car
patch	float	bin:0x1e620	3.89

##---------------------------------------------------
## Node: transmission/default/carreragt/carreragt_top
##---------------------------------------------------

## GEAR_COUNT; 1st GEAR_RATIO offset -6
patch	int16	bin:0x201fe	8

## GEAR_RATIO
patch	float	bin:0x20204	2.62
patch	float	bin:0x20208	0
patch	float	bin:0x2020c	2.77
patch	float	bin:0x20210	1.76
patch	float	bin:0x20214	1.29
patch	float	bin:0x20218	1.01
patch	float	bin:0x2021c	0.82
patch	float	bin:0x20220	0.69
patch	float	bin:0x20224	0

## DIFFERENTIAL
patch	float	bin:0x20230	0.8
patch	float	bin:0x20234	0.8
patch	float	bin:0x20238	0

## GEAR_EFFICIENCY
patch	float	bin:0x20244	1
patch	float	bin:0x20248	1
patch	float	bin:0x2024c	1
patch	float	bin:0x20250	1
patch	float	bin:0x20254	1
patch	float	bin:0x20258	1
patch	float	bin:0x2025c	1
patch	float	bin:0x20260	1
patch	float	bin:0x20264	1

## TORQUE_CONVERTER
patch	float	bin:0x20268	0.5

## TORQUE_SPLIT
patch	float	bin:0x2026c	0

## CLUTCH_SLIP
patch	float	bin:0x20270	0.8

## SHIFT_SPEED
patch	float	bin:0x20278	0.25

## FINAL_GEAR
patch	float	bin:0x2027c	3.09
